<template>
  <!-- 导航栏 -->
  <up-navbar
    :title="title"
    leftIcon=""
    :placeholder="placeholder"
    bgColor="transparent"
    leftIconColor="#fff"
    titleStyle="color: #fff;font-weight: bold;font-size: 34rpx"
  >
    <template #left>
      <view
        class="flex items-center justify-center rounded-full w-[174rpx] h-[64rpx] bg-white bg-opacity-20"
      >
        <up-icon
          name="arrow-left"
          size="18"
          color="#FFF"
          @click="navBack"
        ></up-icon>
        <up-line
          direction="column"
          :hairline="false"
          length="16"
          margin="0 24rpx"
          color="#ccc"
        ></up-line>
        <up-icon name="home" size="20" color="#FFF" @click="navHome"></up-icon>
      </view>
    </template>
  </up-navbar>
</template>

<script setup>
const props = defineProps({
  title: {
    type: String,
    default: "",
  },
  placeholder: {
    type: Boolean,
    default: true,
  },
});
const navBack = () => {
  uni.navigateBack();
};
const navHome = () => {
  uni.switchTab({
    url: "/pages/index/index",
  });
};
</script>

<style lang="scss" scoped></style>
